<template>
  <div>

    <van-cell-group>
      <van-cell title="用户名" :value="userVal_.username" />
      <van-cell title="手机" :value="userVal_.phone" />
      <van-cell title="姓名" :value="userVal_.surname" />
      <van-cell title="推荐人" :value="userVal_.recommend" />
      <van-cell title="状态" :value="userVal_.disable" />
      <van-cell title="注册时间" :value="userVal_.addtime" />
      <van-cell title="最后登录时间" :value="userVal_.logintime" />
    </van-cell-group>

    <div class="btnm">
      <van-button  type="default" @click="goBack" >返回</van-button>
    </div>

  </div>
</template>

<script>
  import {userInfo} from '../../api/basisMG'

export default {
  data () {
    return {
      userVal_:{
        username:"",
        phone:"",
        surname:"",
        recommend:"",
        disable:"",
        addtime:"",
        logintime:""
      }
    }
  },
  mounted() {
    let info_id = this.$root.$mp.query.id
    this.loadinfo(info_id)
  },
  methods: {
    loadinfo(_id){
      userInfo({"_id":_id}).then(res => {
          if(res.data){
            console.log(res.data)
            this.userVal_ = res.data
          }
      })
    },

    goBack(){
      wx.navigateBack({
        delta: 1
      })
    }
    }
  }

</script>

<style >

  page {
    background-color: #fff;
  }
  .btnm{
    text-align: center;
    padding-top: 20rpx;
  }

  .table_parent {
    display:flex;
    justify-content:center;
    align-items:center;
    background: white;
    font-size:30rpx;
    text-align:center;
    box-sizing:border-box;
    color:#595a5e;
    padding-top: 20rpx;
    padding-bottom: 20rpx;
  }
  .table {
    border: 1px solid #dadada;
    border-right: 0;
    border-bottom: 0;
    width: 98%;
  }

  .tr {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .th, .td {
    padding: 10px;
    border-bottom: 1px solid #dadada;
    border-right: 1px solid #dadada;
    text-align: center;
    width: 100%;
  }

  .th {
    font-weight: 400;
    background-color: #dadada;
  }
  ._van-button{margin: 1%;padding: 0}
  ._van-button button {padding: 0}
  .van-button--normal {padding: 0rpx !important; width: 30%}

</style>
